Return to doc.sitecore.com

Valid for Sitecore 5.2, 5.1.1
  Create a Template
Prev Next

To create a new Template:

  1. Choose a name for the Template logically, as it will be exposed to users, but following typical variable naming conventions as it will also be used in code conditionals.
  2. Determine if the new Template can inherit fields from an existing Template, or if a new Base Template should be created.  For example, if all pages on the web site have fields in common, such as Title, NavTitle, Text, Keywords and Description, those Fields should be created in a Base Template which other Templates can inherit.  Follow the instructions below to implement the Base Template if required before following the same instructions to create the new Template.  Base Templates are commonly stored to the Base Templates folder under System in the Templating section.
  3. Log in to the Sitecore Desktop on a development server as a user with appropriate permissions.
  4. Open Template Manager.
  5. If Create a New Template is not visible, select View » Toolbar.
  6. If only a small number of custom Templates are required they can be stored under the Templates node; alternatively folders can be created to structure Templates beneath this node.  Create and/or navigate to the appropriate folder for the new Template.
  7. Either:
    1. Duplicate an existing Template and update properties, or:
    2. Select Create a New Template and step through the wizard:
      1. The Template name can be important to rendering logic but may also be visible to users, who should more frequently work with the Master names.  Name the Template logically, as it will be exposed to users, but following typical variable naming conventions as it will also be used in code conditionals.
      2. If the new Template should inherit structure from an existing Template, select that Template as the Base Template; otherwise leave the default value of System/Templates/Standard Template selected.
  8. Follow the instructions under HOWTO: Add Sections and Fields to Existing Templates to add Sections and Fields to the new Template.
  9. In the Workflow Section for the new Template, set Default Workflow to the Workflow which should be invoked by default for Items based on this Template.
  10. Configure the Layout Section of the new Template.
  11. Optionally, set the Icon Field in the Appearance Section to an image which should be displayed next to Items of this type in the content tree.

Prev Next